﻿@model IEnumerable<KhuyenMaiVang.DAL.Business>

@{
    ViewBag.Title = "Danh sách doanh nghiệp";
    Layout = "~/Areas/Admin/Views/Shared/_AdminLayout.cshtml";
}

@section heading{Danh sách doanh nghiệp}

<p>
    @Html.ActionLink("Thêm doanh nghiệp", "Create")
</p>
<table>
<thead>
    <tr>
        <th>
            Mã số thuế
        </th>
        <th>
            Tên người đại diện
        </th>
        <th>
            Website
        </th>
        <th>
            Tài khoản
        </th>
        <th></th>
    </tr>
    </thead>
    <tbody>
@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.TaxeNumber)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.MangerName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Website)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.User.Username)
        </td>
        <td>
            @Html.ImageLink("Edit", Url.Content("~/Content/areas/admin/resources/images/icons/pencil.png"), "Sửa", new{id=item.ID})
            @Html.ImageLink("Delete", Url.Content("~/Content/areas/admin/resources/images/icons/cross.png"), "Xóa", new{id=item.ID})
        </td>
    </tr>
}
</tbody>
</table>
